Isolate immutable Cloudflare public reads from PHP-WASM#2113
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
buildingandcompletepublication states; the isolated reader accepts only current-schema, non-empty complete publications while the existing mutation Worker retains legacy publication compatibility404/503responses for absent routes and incomplete publications instead of triggering 45-103 second dynamic WordPress requestsRoot Cause
The deployed publication contained
/but not its linked routes.servePublishedWordPressPage()returnednullon a publication miss, so public navigation entered the 23.3 MiB PHP-WASM mutation Worker. Even publication and asset hits shared that monolithic Worker entrypoint.This PR adds a separate 468.68 KiB raw / 115.52 KiB gzip read-only bundle with only an R2 binding. It does not replace or alter intentional dynamic execution through the existing mutation endpoint. Deployment and destination-specific routing remain out of scope.
Compatibility
completepublication, so an old or still-building publication fails quickly rather than being mislabeled ready.buildingpublication and promotes tocompleteonly after a non-empty route set is staged.Verification
npm run buildnpm run test:cloudflare-runtimenpm run cloudflare:dry-run:d1npm run cloudflare:dry-run:public-readergit diff --check origin/main...HEADNo production deployment or mutation was performed.
Fixes #2112
AI Assistance
OpenCode with
openai/gpt-5.6-terraproduced the initial implementation through Homeboy Cook. OpenCode withopenai/gpt-5.6-solreviewed and corrected publication readiness, core-asset coverage, cache behavior, tests, and final verification. Chris Huber reviewed and directed the architecture and scope.